<?php
/**
 * Created by PhpStorm.
 * User: charles
 * Date: 2017-11-6
 * Time: 23:01
 */

namespace App\Http\Controllers\Wechat;


use App\Http\Controllers\Controller;
use App\Models\Complain;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;

class TousuController extends Controller
{
    public function getIndex(Request $request)
    {
        $complain = new Complain();
        $complain->openid = Session::get('wechat_openid');
        $complain->wechat_upload_id = (int) $request->id;
        $complain->step = 1;
        $complain->save();
        return view('wechat.tousu.index');
    }

    public function getIndex2(Request $request)
    {
        $complain = new Complain();
        $complain->openid = Session::get('wechat_openid');
        $complain->wechat_upload_id = (int) $request->id;
        $complain->step = 2;
        $complain->save();
        return view('wechat.tousu.index2');
    }

    public function getIndex3(Request $request)
    {
        $complain = new Complain();
        $complain->openid = Session::get('wechat_openid');
        $complain->wechat_upload_id = (int) $request->id;
        $complain->step = 3;
        $complain->save();
        return view('wechat.tousu.index3');
    }

    public function getIndex4(Request $request)
    {
        $complain = new Complain();
        $complain->openid = Session::get('wechat_openid');
        $complain->wechat_upload_id = (int) $request->id;
        $complain->step = 4;
        $complain->save();
        return view('wechat.tousu.index4');
    }

    public function getXuzhi(Request $request)
    {
        $complain = new Complain();
        $complain->openid = Session::get('wechat_openid');
        $complain->wechat_upload_id = (int) $request->id;
        $complain->step = 127;
        $complain->save();
        return view('wechat.tousu.xuzhi');
    }
}